<!-- 加载 -->
<div class="demo-block">
    <div class="ui-loading-block">
        <div class="ui-loading-cnt">
            <i class="ui-loading-bright"></i>
            <p>正在加载中...</p>
        </div>
    </div>
</div>
<!-- 消息对话框 -->
<div class="ui-dialog ui-msgDialog">
    <div class="ui-dialog-cnt">
        <header class="ui-dialog-hd ui-border-b">
            <h3>消息提示</h3>
            <i class="ui-dialog-close" data-role="button"></i>
        </header>
        <div class="ui-dialog-bd">
            <div id="msg" style="text-align:center;"></div>
        </div>
    </div>        
</div>
<!-- tips -->
<div class="ui-poptips ui-poptips-success">
    <div class="ui-poptips-cnt" style="height:0;"><i></i><span class="ui-poptips-text"></span></div>
</div>  


$(".ui-poptips .ui-poptips-text").text('评论成功！');
$(".ui-poptips .ui-poptips-cnt").height('auto');

setTimeout(function(){$(".ui-poptips .ui-poptips-cnt").height(0);},3000);




$.ajax({
    url:'../infoType',
    type:'GET',
    dataType: 'json',
    success:function(data){
        if(data){
            _createTypeList(data);                
        }
    },
    error:function(xhr,type){
        var res = xhr&&eval('('+xhr.response+')');
        var msg = res.message?res.message.replace(/([^\u4e00-\u9fa5]+)/g,''):'未知错误';
        _createAlert(msg);
    }
});




$('.ui-loading-block').dialog('show');
$('.ui-loading-block').dialog('hide');


//对话框
function _createAlert(content){        
    
    $('#msg').html(((!content)?'未知错误，请稍后再试！':content));
    $('.ui-msgDialog').dialog('show');

}




